package Bussiness;

import Controller.Insert;
import Model.BangDiem;
import Model.KhoaHoc;
import Model.LopHoc;
import Model.MonHoc;
import Model.SinhVien;

/**
 *
 * @author Nhóm java lớp PNV2T - Nguyễn Thị Lệ Đài - Nguyễn Chí Hướng
 */
public class Insert_Action {
    Insert in = null;
    /** Creates a new instance of Insert_Action */
    public Insert_Action() {
        in = new Insert();
    }
    
    public boolean ThemKhoaMoi(KhoaHoc newKH){
        if (in.ThemKhoaMoi(newKH)>0)
            return true;
        return false;
    }
    
    public boolean ThemLopHocMoi(LopHoc newLop){
        if (in.ThemLopHoc(newLop)>0)
            return true;
        return false;
    }
    
    public boolean ThemSinhVien(SinhVien newSV){
        if (in.ThemSinhVien(newSV)>0)
            return true;
        return false;
    }
    
    public boolean ThemDiem(BangDiem newDiem){
        if (in.ThemDiem(newDiem)>0)
            return true;
        return false;
    }
    
    public boolean ThemMonHoc(MonHoc newMon){
        if (in.ThemMonHoc(newMon)>0)
            return true;
        return false;
    }
    
    public boolean ThemTaiKhoan(String tenTK, String MK){
        if (in.ThemTaiKhoan(tenTK, MK)>0)
            return true;
        return false;
    }
    
    public void Close(){
        in.CloseData();
    }
    
}
